package com.xy.designPatterns.chainOfResponsibility;

import com.xy.designPatterns.chainOfResponsibility.AbstractArticleHandler;
import com.xy.designPatterns.chainOfResponsibility.Article;

public class ProhibitedContentHandler extends AbstractArticleHandler {

    @Override
    protected boolean canHandle(Article article) {
        return article.getContent().contains("违禁");
    }

    @Override
    protected void doHandle(Article article) {
        // 检测到违禁内容，文章下架并报警
    }
}
